package com.zyl.pts.domain.dto.QRDTO;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.URL;

/**
 * @version v1.0
 * @ProjectName: product_source
 * @Package: com.zyl.pts.domain.dto.QRDTO
 * @ClassName: QRUpdateOrAdd
 * @Description TODO()
 * @Author 翟玉龙
 * @Date 2024/11/19-14:29
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class QRUpdateOrAddDTO {
    /**
     * 记录id
     */
    @JsonProperty("grId")
    private Integer grId;
    /**
     * 检疫时间
     */
    @NotBlank(message = "检疫时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonProperty("grTime")
    private String grTime;
    /**
     * 检疫证明图片
     */
    @NotBlank(message = "检疫证明图片不能为空")
    @URL(message = "请输入正确的图片链接")
    @JsonProperty("grImg")
    private String grImg;
    /**
     * 检疫机构
     */
    @NotNull(message = "防疫机构不能为空")
    @JsonProperty("grMechanism")
    private String grMechanism;
    /**
     * 批次id
     */
    @NotNull(message = "批次id不能为空")
    @JsonProperty("grBatchId")
    private String grBatchId;
    /**
     * 检疫结果
     */
    @NotNull(message = "检疫结果不能为空")
    @JsonProperty("bQualified")
    private String bQualified;
}
